package com.roads.screen.service.impl;

import com.roads.common.utils.DateUtils;
import com.roads.screen.domain.LargeScreen;
import com.roads.screen.mapper.LargeScreenMapper;
import com.roads.screen.service.ILargeScreenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 可视化大屏列表service实现
 *
 * @author nhp
 * @date 2023-10-10
 */
@Service
public class LargeScreenServiceImpl implements ILargeScreenService {

    @Autowired
    private LargeScreenMapper mapper;

    @Override
    public LargeScreen getModelById(Integer id) {
        return mapper.getModelById(id);
    }

    @Override
    public List<LargeScreen> selectModelList(LargeScreen model) {
        return mapper.selectModelList(model);
    }

    @Override
    public int insert(LargeScreen model) {
        model.setCreateTime(DateUtils.getNowDate());
        return mapper.insert(model);
    }

    @Override
    public int update(LargeScreen model) {
        model.setUpdateTime(DateUtils.getNowDate());
        return mapper.update(model);
    }

    @Override
    public int delete(Integer id) {
        return mapper.delete(id);
    }
}
